<%@ page import="com.gpay.erp.core.system.bean.SysUser" %>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<script src="<%=request.getContextPath() %>/resources/js/pay/payManage.js"
        type="text/javascript"></script>
<script src="<%=request.getContextPath() %>/resources/js/pay/payS.js"
        type="text/javascript"></script>
<script src="<%=request.getContextPath() %>/resources/js/pay/payDetail.js"
        type="text/javascript"></script>
<script>
  $(function () {
    var payId = $('#payId').text();
    initSelect($('#paidType'), paymentOrderType, true);
    initSelect($('#currencys'), currencysData, true);

    var data = getStatusData("/paymentOrder/selectPaymentOrderSub.html?id=" + payId);
    loadData(data.paymentOrder);
    var payDetailListSubOptions = getPayDetailListSubOptions();
    payDetailListSubOptions.data = data.paymentOrderSubs;
    initDataGridNoPager($('#subItem'), payDetailListSubOptions);
    if($('#hongchongId').val()){
      $("#hongChongFunction").click(function(){
        postAjax("/paymentOrder/updatePaymentOrderSub.html?id="+$('#hongchongId').val(), {},
                refreshPayList,
                {async: false,type:'get'});
      });
    }else{
      $("#hongChongFunction").linkbutton('disable');
    }
  });


</script>
<var hidden="hidden" id="payId">${payId}</var>
<div class="easyui-layout" data-options="fit : true,border : false">
  <div data-options="region:'north',title:'财务付款明细',border : false" style="height: 140px; overflow: hidden;">
    <form id="searchForm-small">
      <div class="mLeft60">
        <div class="mTop10 line-handsome">
          <div class="fLeft label-handsome ">
            <label>付款申请号:</label>
            <input id="paidAppNumber" name="paidAppNumber" class="easyui-input" readonly>
            </input>
            <input id="hongchongId" name="id" class="easyui-input" hidden readonly>
            </input>
          </div>
          <div class="fLeft label-handsome ">
            <label>申请金额:</label>
            <input id="appAmount" name="appAmount" class="easyui-input" readonly/>
          </div>

          <div class="fLeft label-handsome ">
            <label>付款单号:</label>
            <input id="paidNumber" name="paidNumber" class="easyui-input" readonly/>
          </div>
        </div>
        <div class="mTop10 line-handsome">
          <div class="fLeft label-handsome ">
            <label>供应商代码:</label>
            <input id="providerCode" name="providerCode" class="easyui-input" readonly/>
          </div>
          <div class="fLeft label-handsome ">
            <label>供应商名称:</label>
            <input id="providerName" name="providerName" class="easyui-input" readonly/>
          </div>
          <div class="fLeft label-handsome" id="paidTypeDiv">
            <label>付款类型:</label>
            <select id="paidType" name="paidType" style="width:90px" disabled>
            </select>
          </div>
          <div class="fLeft label-handsome ">
            <label>付款日期:</label>
            <input id="paidDate" type="text" name="paidDate" style="width:90px" readonly/>
          </div>
          <div class="fLeft label-handsome ">
            <label>实付金额:</label>
            <input id="realAmount" type="text" name="realAmount" class="easyui-input" readonly/>
          </div>
        </div>
        <div class="mTop10 line-handsome">
          <div class="fLeft label-handsome ">
            <label>币种:</label>
            <select id="currencys" name="currencys" style="width:90px" disabled>
            </select>
          </div>
          <div class="fLeft label-handsome ">
            <label>付款说明:</label>
            <input id="paidRemark" name="paidRemark" class="easyui-input" readonly/>
          </div>
          <div class="fLeft label-handsome ">
            <label>备注:</label>
            <input id="remark" name="remark" class="easyui-input" readonly/>
          </div>
        </div>
      </div>
    </form>
  </div>
  <div data-options="region:'center',border : false,title:'财务票据信息列表'">
    <table id="subItem"></table>
  </div>
</div>